package com.atguigu.test;

public enum MyStatus {

    //定义枚举 就是定义常量
    SUCCESS(200,"业务成功"),
    FAIL(201,"业务失败");

    private Integer code;
    private String msg;

    MyStatus(Integer code,String msg) {
        this.code = code;
        this.msg = msg;
    }

    @Override
    public String toString() {
        return "MyStatus{" +
                "code=" + code +
                ", msg='" + msg + '\'' +
                '}';
    }
}
